package com.gsit.omega.ea.domain;

import com.gsit.omega.ea.utils.ActivityStatus;
import java.util.Calendar;
import javax.persistence.Enumerated;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.roo.addon.entity.RooEntity;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.tostring.RooToString;

@RooJavaBean
@RooToString
@RooEntity(finders = { "findActivitysByCodeEquals", "findActivitysByStatus" })
public class Activity {

    @NotNull
    private String code;

    @NotNull
    private String name;

    private String description;

    @NotNull
    private Integer noOfRecordOrHours = 0;

    @NotNull
    private Integer toDo = 0;

    @NotNull
    @Temporal(TemporalType.TIMESTAMP)
    @DateTimeFormat(style = "M-")
    private Calendar startDate;

    @Temporal(TemporalType.TIMESTAMP)
    @DateTimeFormat(style = "M-")
    private Calendar endDate;

    @Enumerated
    private ActivityStatus status;
}
